﻿#include "lvgl_style.h"
#include "string.h"
#include "stdio.h"
#include "font.h"



__lvgl_style lvgl_style;

static void lvgl_style_preload(void);


void lvgl_style_init(void)
{

    uint8_t stste[] = { LV_STATE_DEFAULT ,LV_STATE_CHECKED ,LV_STATE_FOCUSED ,LV_STATE_EDITED ,LV_STATE_HOVERED ,LV_STATE_PRESSED ,LV_STATE_DISABLED };
    lv_style_init(&lvgl_style.cont_no_border);
    lv_style_set_radius(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, 0);//圆角
    lv_style_set_border_opa(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, 255);//边框透明度
    lv_style_set_border_width(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, 0);//边框宽度
    lv_style_set_border_side(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, LV_BORDER_SIDE_NONE);
    lv_style_set_border_blend_mode(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, LV_BLEND_MODE_NORMAL);
    lv_style_set_pad_top(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, 0);//内边距上侧尺寸
    lv_style_set_pad_bottom(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, 0);//内边距下侧尺寸
    lv_style_set_pad_left(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, 0);//内边距左侧尺寸
    lv_style_set_pad_right(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, 0);//内边距右侧尺寸



    /*背景色*/
    lv_style_set_bg_opa(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));//背景上面颜色
    lv_style_set_bg_grad_dir(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);//渐变方向

    /*调整渐变色位置*/
    lv_style_set_bg_main_stop(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, 10);
    lv_style_set_bg_main_stop(&lvgl_style.cont_no_border, LV_STATE_DEFAULT, 100);


    lv_style_init(&lvgl_style.cont_transparent);
    for (int i = 0; i < sizeof(stste); i++)
    {
        lv_style_set_radius(&lvgl_style.cont_transparent, stste[i], 0);//圆角
        lv_style_set_border_opa(&lvgl_style.cont_transparent, stste[i], 255);//边框透明度
        lv_style_set_border_width(&lvgl_style.cont_transparent, stste[i], 0);//边框宽度
        lv_style_set_border_side(&lvgl_style.cont_transparent, stste[i], LV_BORDER_SIDE_NONE);
        lv_style_set_border_blend_mode(&lvgl_style.cont_transparent, stste[i], LV_BLEND_MODE_NORMAL);
        lv_style_set_pad_top(&lvgl_style.cont_transparent, stste[i], 0);//内边距上侧尺寸
        lv_style_set_pad_bottom(&lvgl_style.cont_transparent, stste[i], 0);//内边距下侧尺寸
        lv_style_set_pad_left(&lvgl_style.cont_transparent, stste[i], 0);//内边距左侧尺寸
        lv_style_set_pad_right(&lvgl_style.cont_transparent, stste[i], 0);//内边距右侧尺寸


        /*背景色*/
        lv_style_set_bg_opa(&lvgl_style.cont_transparent, stste[i], LV_OPA_TRANSP);//背景透明度
        lv_style_set_bg_color(&lvgl_style.cont_transparent, stste[i], LV_COLOR_MAKE(0xff, 0xff, 0xff));//背景上面颜色
        lv_style_set_bg_grad_color(&lvgl_style.cont_transparent, stste[i], LV_COLOR_MAKE(0xff, 0xff, 0xff));//背景上面颜色
        lv_style_set_bg_grad_dir(&lvgl_style.cont_transparent, stste[i], LV_GRAD_DIR_VER);//渐变方向

        /*调整渐变色位置*/
        lv_style_set_bg_main_stop(&lvgl_style.cont_transparent, stste[i], 10);
        lv_style_set_bg_main_stop(&lvgl_style.cont_transparent, stste[i], 100);

    }

    lv_style_init(&lvgl_style.font_changyong_12_white_bg);
    lv_style_set_text_color(&lvgl_style.font_changyong_12_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));

    lv_style_set_text_font(&lvgl_style.font_changyong_12_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_ChangYongHanZi_12);


    lv_style_init(&lvgl_style.font_changyong_12_black_bg);
    lv_style_set_text_color(&lvgl_style.font_changyong_12_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font_changyong_12_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_ChangYongHanZi_12);


    lv_style_init(&lvgl_style.font_changyong_16_white_bg);
    lv_style_set_text_color(&lvgl_style.font_changyong_16_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));

    lv_style_set_text_font(&lvgl_style.font_changyong_16_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_ChangYongHanZi_16);


    lv_style_init(&lvgl_style.font_changyong_16_black_bg);
    lv_style_set_text_color(&lvgl_style.font_changyong_16_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font_changyong_16_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_ChangYongHanZi_16);


    lv_style_init(&lvgl_style.font_changyong_24_white_bg);
    lv_style_set_text_color(&lvgl_style.font_changyong_24_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));

    lv_style_set_text_font(&lvgl_style.font_changyong_24_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_ChangYongHanZi_24);


    lv_style_init(&lvgl_style.font_changyong_24_black_bg);
    lv_style_set_text_color(&lvgl_style.font_changyong_24_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font_changyong_24_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_ChangYongHanZi_24);


    lv_style_init(&lvgl_style.font12_white_bg);
    lv_style_set_text_color(&lvgl_style.font12_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));

    lv_style_set_text_font(&lvgl_style.font12_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_12);


    lv_style_init(&lvgl_style.font12_black_bg);
    lv_style_set_text_color(&lvgl_style.font12_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font12_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_12);



    lv_style_init(&lvgl_style.font16_white_bg);
    lv_style_set_text_color(&lvgl_style.font16_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));

    lv_style_set_text_font(&lvgl_style.font16_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_16);


    lv_style_init(&lvgl_style.font16_black_bg);
    lv_style_set_text_color(&lvgl_style.font16_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font16_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_16);

    lv_style_init(&lvgl_style.font24_white_bg);
    lv_style_set_text_color(&lvgl_style.font24_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));

    lv_style_set_text_font(&lvgl_style.font24_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_24);


    lv_style_init(&lvgl_style.font24_black_bg);
    lv_style_set_text_color(&lvgl_style.font24_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font24_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_24);



    lv_style_init(&lvgl_style.font32_white_bg);
    lv_style_set_text_color(&lvgl_style.font32_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));
    lv_style_set_text_font(&lvgl_style.font32_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_ascii_32);


    lv_style_init(&lvgl_style.font32_black_bg);
    lv_style_set_text_color(&lvgl_style.font32_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font32_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_ascii_32);

    lv_style_init(&lvgl_style.font48_white_bg);
    lv_style_set_text_color(&lvgl_style.font48_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));
    lv_style_set_text_font(&lvgl_style.font48_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_48);


    lv_style_init(&lvgl_style.font48_black_bg);
    lv_style_set_text_color(&lvgl_style.font48_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font48_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_48);


    lv_style_init(&lvgl_style.font80_white_bg);
    lv_style_set_text_color(&lvgl_style.font80_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));
    lv_style_set_text_font(&lvgl_style.font80_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_80);


    lv_style_init(&lvgl_style.font80_black_bg);
    lv_style_set_text_color(&lvgl_style.font80_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font80_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_acsii_80);

    lv_style_init(&lvgl_style.font_clock_style2_white_bg);
    lv_style_set_text_color(&lvgl_style.font_clock_style2_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));
    lv_style_set_text_font(&lvgl_style.font_clock_style2_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_clock_style2);
    lv_style_init(&lvgl_style.font_clock_style2_black_bg);
    lv_style_set_text_color(&lvgl_style.font_clock_style2_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font_clock_style2_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_clock_style2);

    lv_style_init(&lvgl_style.font_clock_style3_white_bg);
    lv_style_set_text_color(&lvgl_style.font_clock_style3_white_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));
    lv_style_set_text_font(&lvgl_style.font_clock_style3_white_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_clock_style3);
    lv_style_init(&lvgl_style.font_clock_style3_black_bg);
    lv_style_set_text_color(&lvgl_style.font_clock_style3_black_bg, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));
    lv_style_set_text_font(&lvgl_style.font_clock_style3_black_bg, LV_STATE_DEFAULT, (const lv_font_t*)&font_clock_style3);


    lvgl_style_preload();
    //style_rili_init();

}


static void lvgl_style_preload(void)
{

	//----preload底部园默认样式----//
	lv_style_init(&lvgl_style.lvgl_preload_spinning_style);
	lv_style_set_text_color(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));
	lv_style_set_text_font(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, (const lv_font_t*)&font_ChangYongHanZi_12);
	lv_style_set_radius(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, 6);//圆角

	lv_style_set_pad_top(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, 0);//内边距上侧尺寸
	lv_style_set_pad_bottom(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, 0);//内边距下侧尺寸
	lv_style_set_pad_left(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, 0);//内边距左侧尺寸
	lv_style_set_pad_right(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, 0);//内边距右侧尺寸

	//线条样式
	lv_style_set_line_color(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));
	lv_style_set_line_width(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, 10);

	//默认样式
	lv_style_set_border_opa(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, LV_OPA_TRANSP);//边框透明度
	lv_style_set_border_width(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, 1);//边框宽度
	lv_style_set_border_color(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x71, 0xbc));//边框颜色
	lv_style_set_border_side(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, LV_BORDER_SIDE_NONE);
	lv_style_set_border_blend_mode(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, LV_BLEND_MODE_NORMAL);

	lv_style_set_bg_opa(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, LV_OPA_TRANSP);//背景透明度
	lv_style_set_bg_color(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));//背景上面颜色
	lv_style_set_bg_grad_color(&lvgl_style.lvgl_preload_spinning_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));//背景上面颜色

//----preload底部园默认样式----//

	//----preload旋转的弧形默认样式----//
	lv_style_init(&lvgl_style.lvgl_preloadfillspin_style);
	lv_style_set_text_color(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));
	lv_style_set_text_font(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, (const lv_font_t*)&font_ChangYongHanZi_12);
	lv_style_set_radius(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, 6);//圆角

	lv_style_set_pad_top(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, 2);//内边距上侧尺寸
	lv_style_set_pad_bottom(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, 2);//内边距下侧尺寸
	lv_style_set_pad_left(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, 2);//内边距左侧尺寸
	lv_style_set_pad_right(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, 2);//内边距右侧尺寸

	//线条样式
	lv_style_set_line_color(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));
	lv_style_set_line_width(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, 7);

	//默认样式
	lv_style_set_border_opa(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, LV_OPA_TRANSP);//边框透明度
	lv_style_set_border_width(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, 1);//边框宽度
	lv_style_set_border_color(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x71, 0xbc));//边框颜色
	lv_style_set_border_side(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, LV_BORDER_SIDE_NONE);
	lv_style_set_border_blend_mode(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, LV_BLEND_MODE_NORMAL);

	lv_style_set_bg_opa(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, LV_OPA_TRANSP);//背景透明度
	lv_style_set_bg_color(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));//背景上面颜色
	lv_style_set_bg_grad_color(&lvgl_style.lvgl_preloadfillspin_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));//背景上面颜色

	//----preload旋转的弧形默认样式----//
}


#if 0
lv_style_t lvgl_rili_bg_style;				//日历背景默认样式
lv_style_t lvgl_rili_header_style;			//日历header默认样式
lv_style_t lvgl_rili_day_name_style;		//日历day_name默认样式
lv_style_t lvgl_rili_date_style;			//日历date默认样式


void style_rili_init(void)
{

    lv_style_init(&lvgl_rili_bg_style);

    lv_style_set_radius(&lvgl_rili_bg_style, LV_STATE_DEFAULT, 0);//圆角

    lv_style_set_border_opa(&lvgl_rili_bg_style, LV_STATE_DEFAULT, LV_OPA_COVER);//边框透明度
    lv_style_set_border_width(&lvgl_rili_bg_style, LV_STATE_DEFAULT, 2);//边框宽度
    lv_style_set_border_side(&lvgl_rili_bg_style, LV_STATE_DEFAULT, LV_BORDER_SIDE_FULL);
    lv_style_set_border_blend_mode(&lvgl_rili_bg_style, LV_STATE_DEFAULT, LV_BLEND_MODE_NORMAL);
    lv_style_set_border_color(&lvgl_rili_bg_style, LV_STATE_DEFAULT, rili_biankuang_bg_color);//边框颜色



    lv_style_set_pad_top(&lvgl_rili_bg_style, LV_STATE_DEFAULT, 2);//内边距上侧尺寸
    lv_style_set_pad_bottom(&lvgl_rili_bg_style, LV_STATE_DEFAULT, 2);//内边距下侧尺寸
    lv_style_set_pad_left(&lvgl_rili_bg_style, LV_STATE_DEFAULT, 2);//内边距左侧尺寸
    lv_style_set_pad_right(&lvgl_rili_bg_style, LV_STATE_DEFAULT, 2);//内边距右侧尺寸



    lv_style_set_shadow_opa(&lvgl_rili_bg_style, LV_STATE_DEFAULT, LV_OPA_COVER);//阴影透明度
    lv_style_set_shadow_color(&lvgl_rili_bg_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));//阴影颜色
    lv_style_set_shadow_width(&lvgl_rili_bg_style, LV_STATE_DEFAULT, 0);//阴影宽度

    lv_style_set_bg_opa(&lvgl_rili_bg_style, LV_STATE_DEFAULT, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_rili_bg_style, LV_STATE_DEFAULT, rili_bg_color);//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_rili_bg_style, LV_STATE_DEFAULT, rili_bg_color);//背景上面颜色

//-----聚焦时-----//
    lv_style_set_border_color(&lvgl_rili_bg_style, LV_STATE_FOCUSED, rili_biankuang_bg_color);//边框颜色


    lv_style_set_bg_opa(&lvgl_rili_bg_style, LV_STATE_FOCUSED, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_rili_bg_style, LV_STATE_FOCUSED, rili_bg_color);//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_rili_bg_style, LV_STATE_FOCUSED, rili_bg_color);//背景上面颜色


    lv_style_set_shadow_opa(&lvgl_rili_bg_style, LV_STATE_FOCUSED, LV_OPA_COVER);//阴影透明度
    lv_style_set_shadow_color(&lvgl_rili_bg_style, LV_STATE_FOCUSED, LV_COLOR_MAKE(0x00, 0x00, 0x00));//阴影颜色
    lv_style_set_shadow_width(&lvgl_rili_bg_style, LV_STATE_FOCUSED, 0);//阴影宽度
//-----聚焦时-----//


    lv_style_set_text_color(&lvgl_rili_bg_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x00, 0x00));//文字颜色

    lv_style_set_text_color(&lvgl_rili_bg_style, LV_STATE_FOCUSED, LV_COLOR_MAKE(0x00, 0x00, 0x00));//文字颜色




//----日历header默认样式----//
    lv_style_init(&lvgl_rili_header_style);
    lv_style_copy(&lvgl_rili_header_style, &lvgl_rili_bg_style);


    lv_style_set_bg_opa(&lvgl_rili_header_style, LV_STATE_DEFAULT, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_rili_header_style, LV_STATE_DEFAULT, rili_biankuang_bg_color);//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_rili_header_style, LV_STATE_DEFAULT, rili_biankuang_bg_color);//背景上面颜色



    lv_style_set_text_color(&lvgl_rili_header_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xFF, 0xFF, 0xFF));//文字颜色
    lv_style_set_text_font(&lvgl_rili_header_style, LV_STATE_DEFAULT, (const lv_font_t*)&lv_font_montserrat_24);//字体

    //----聚焦时----//
    lv_style_set_bg_opa(&lvgl_rili_header_style, LV_STATE_FOCUSED, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_rili_header_style, LV_STATE_FOCUSED, rili_biankuang_bg_color);//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_rili_header_style, LV_STATE_FOCUSED, rili_biankuang_bg_color);//背景上面颜色




    lv_style_set_text_color(&lvgl_rili_header_style, LV_STATE_FOCUSED, LV_COLOR_MAKE(0xFF, 0xFF, 0xFF));//文字颜色
    lv_style_set_text_font(&lvgl_rili_header_style, LV_STATE_FOCUSED, (const lv_font_t*)&lv_font_montserrat_24);//字体
    //----聚焦时----//



//----日历day_name默认样式----// 负责 星期处的文字颜色
    lv_style_init(&lvgl_rili_day_name_style);
    lv_style_copy(&lvgl_rili_day_name_style, &lvgl_rili_bg_style);

    lv_style_set_bg_opa(&lvgl_rili_day_name_style, LV_STATE_DEFAULT, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_rili_day_name_style, LV_STATE_DEFAULT, rili_biankuang_bg_color);//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_rili_day_name_style, LV_STATE_DEFAULT, rili_biankuang_bg_color);//背景上面颜色



    lv_style_set_text_color(&lvgl_rili_day_name_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x00, 0x7f, 0xff));//文字颜色
    lv_style_set_text_font(&lvgl_rili_day_name_style, LV_STATE_DEFAULT, (const lv_font_t*)&font_ZiDing_K8_12);//字体

    //----聚焦时----//
    lv_style_set_bg_opa(&lvgl_rili_day_name_style, LV_STATE_FOCUSED, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_rili_day_name_style, LV_STATE_FOCUSED, rili_biankuang_bg_color);//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_rili_day_name_style, LV_STATE_FOCUSED, rili_biankuang_bg_color);//背景上面颜色


    lv_style_set_text_color(&lvgl_rili_day_name_style, LV_STATE_FOCUSED, LV_COLOR_MAKE(0x00, 0x7f, 0xff));//文字颜色
    lv_style_set_text_font(&lvgl_rili_day_name_style, LV_STATE_FOCUSED, (const lv_font_t*)&font_ZiDing_K8_12);//字体
    //----聚焦时----//




//----日历date默认样式----//
    lv_style_init(&lvgl_rili_date_style);
    //lv_style_copy(&lvgl_rili_date_style, &lvgl_rili_bg_style);


    lv_style_set_radius(&lvgl_rili_date_style, LV_STATE_DEFAULT, 20);//圆角

    lv_style_set_border_opa(&lvgl_rili_date_style, LV_STATE_DEFAULT, LV_OPA_COVER);//边框透明度
    lv_style_set_border_width(&lvgl_rili_date_style, LV_STATE_DEFAULT, 0);//边框宽度
    lv_style_set_border_side(&lvgl_rili_date_style, LV_STATE_DEFAULT, LV_BORDER_SIDE_NONE);
    lv_style_set_border_blend_mode(&lvgl_rili_date_style, LV_STATE_DEFAULT, LV_BLEND_MODE_NORMAL);
    lv_style_set_border_color(&lvgl_rili_date_style, LV_STATE_DEFAULT, rili_biankuang_bg_color);//边框颜色



    lv_style_set_pad_top(&lvgl_rili_date_style, LV_STATE_DEFAULT, 2);//内边距上侧尺寸
    lv_style_set_pad_bottom(&lvgl_rili_date_style, LV_STATE_DEFAULT, 2);//内边距下侧尺寸
    lv_style_set_pad_left(&lvgl_rili_date_style, LV_STATE_DEFAULT, 2);//内边距左侧尺寸
    lv_style_set_pad_right(&lvgl_rili_date_style, LV_STATE_DEFAULT, 2);//内边距右侧尺寸


    lv_style_set_bg_opa(&lvgl_rili_date_style, LV_STATE_DEFAULT, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_rili_date_style, LV_STATE_DEFAULT, rili_bg_color);//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_rili_date_style, LV_STATE_DEFAULT, rili_bg_color);//背景上面颜色


    lv_style_set_text_color(&lvgl_rili_date_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xff, 0xff));//文字颜色
    lv_style_set_text_font(&lvgl_rili_date_style, LV_STATE_DEFAULT, (const lv_font_t*)&lv_font_montserrat_16);//字体

    //----聚焦时----//
    lv_style_set_bg_opa(&lvgl_rili_date_style, LV_STATE_FOCUSED, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_rili_date_style, LV_STATE_FOCUSED, LV_COLOR_MAKE(0x55, 0x96, 0xd8));//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_rili_date_style, LV_STATE_FOCUSED, LV_COLOR_MAKE(0x55, 0x96, 0xd8));//背景上面颜色


    lv_style_set_text_color(&lvgl_rili_date_style, LV_STATE_FOCUSED, LV_COLOR_MAKE(0xff, 0xff, 0xff));//文字颜色
    lv_style_set_text_font(&lvgl_rili_date_style, LV_STATE_FOCUSED, (const lv_font_t*)&lv_font_montserrat_16);//字体
    //----聚焦时----//


    //----按下时----//
    lv_style_set_bg_opa(&lvgl_rili_date_style, LV_STATE_PRESSED, LV_OPA_COVER);//背景透明度
    lv_style_set_bg_color(&lvgl_rili_date_style, LV_STATE_PRESSED, LV_COLOR_MAKE(0x55, 0x55, 0x55));//背景上面颜色
    lv_style_set_bg_grad_color(&lvgl_rili_date_style, LV_STATE_PRESSED, LV_COLOR_MAKE(0x55, 0x55, 0x55));//背景上面颜色


    lv_style_set_text_color(&lvgl_rili_date_style, LV_STATE_PRESSED, LV_COLOR_MAKE(0xff, 0xff, 0xff));//文字颜色
    lv_style_set_text_font(&lvgl_rili_date_style, LV_STATE_PRESSED, (const lv_font_t*)&lv_font_montserrat_16);//字体
    //----按下时----//
}
#endif
